<extend name="Public/base" />
<block name="footer">
	<include file="Public/footer" />
	<script>
	$('#addcontact').click(function() {
		var html = '<li style="display:block;width:100%:line-height:34px;height:34px;"><input type="text" name="tel[]" value="" class="form-control" style="width:80%;float:left;"> <button type="button" style="margin-left:10px;" class="btn btn-default" onclick="deltel(this)">删除</button></li>'; 
		$('#contactlist').append(html);
	});
	function deltel(self) {
		$(self).parent().remove();
	}
	</script>
</block>
<block name="main">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">学员信息</h1>
			</div>
			<!-- /.col-lg-12 -->
		</div>

		<div class="row">
			<div class="col-lg-12">
				<!--
				<div class="panel panel-default">
					<div class="panel-heading"> Basic Form Elements </div>
				</div>
				-->
				<div class="panel-body">
					<div class="row">
						<div class="col-lg-6">
							<form action="" method="post">
								<if condition="$info['num']">
								<div class="form-group">
									<label>学号</label>
									<label>{$info['num']}</label>
								</div>
								</if>
								<volist name="input" id="input">
								<if condition="$input['key'] eq 'PRI'">
								<input name="{$input['field']}" value="{$info[$input['field']]}" type="hidden">
								<else/>
								<if condition="in_array($input['field'],$showcol)">
								<div class="form-group">
									<label>{$input['comment']|comment=###,'name'}</label>
									<input class="form-control" name="{$input['field']}" value="{$info[$input['field']]}">
									<!--<p class="help-block">描述</p>-->
								</div>
								</if>
								</if>
								</volist>
								<div class="form-group">
									<label>性别</label>
									<input type="radio" name="sex" value="0" <if condition="$info['sex'] eq 0">checked="checked"</if> > 男
									<input type="radio" name="sex" value="1" <if condition="$info['sex'] eq 1">checked="checked"</if> > 女
								</div>
								<div class="form-group">
									<label>电话</label>
								</div>
									<ul id="contactlist" style="width:100%;height:auto;">
									<volist name="mobile" id="mobile">
									<li style="display:block;width:100%:line-height:34px;height:34px;"><input type="text" name="tel[]" value="{$mobile}" class="form-control" style="width:80%;float:left;"> <button type="button" style="margin-left:10px;" class="btn btn-default" onclick="deltel(this)">删除</button></li>
									</volist>
									</ul>
									<button type="button" class="btn btn-default" id="addcontact" style="clear:both;">添加联系方式</button>
								<div class="form-group">
									<label>意向</label>
									<textarea class="form-control" rows="3" name="intention">{$info['intention']}</textarea>
								</div>
								<if condition="$info['time']">
								<div class="form-group">
									<label>报名时间</label>
									<label>{$info['time']|date="Y-m-d H:i:s",###}</label>
								</div>
								</if>
								<button type="submit" class="btn btn-default">提交</button>
							</form>
						</div>
					</div>
				</div>
			</div>
			<!-- /.col-lg-12 -->
		</div>
		<!-- /.row -->
	</div>
</block>
